package character;

import org.jgap.FitnessFunction;

public abstract class Profile {
	
	private int strength;
	private int agility;
	private int stamina;
	private int intellect;
	private int spirit;
	
	public Profile(){
		this.strength	= 1;
		this.agility	= 1;
		this.stamina	= 1;
		this.intellect	= 1;
		this.spirit		= 1;
	}
	
	public abstract FitnessFunction getProfileFitness();

	/**
	 * @return the strength
	 */
	public int getStrength() {
		return strength;
	}

	/**
	 * @param strength the strength to set
	 */
	public void setStrength(int strength) {
		this.strength = strength;
	}

	/**
	 * @return the agility
	 */
	public int getAgility() {
		return agility;
	}

	/**
	 * @param agility the agility to set
	 */
	public void setAgility(int agility) {
		this.agility = agility;
	}

	/**
	 * @return the stamina
	 */
	public int getStamina() {
		return stamina;
	}

	/**
	 * @param stamina the stamina to set
	 */
	public void setStamina(int stamina) {
		this.stamina = stamina;
	}

	/**
	 * @return the intellect
	 */
	public int getIntellect() {
		return intellect;
	}

	/**
	 * @param intellect the intellect to set
	 */
	public void setIntellect(int intellect) {
		this.intellect = intellect;
	}

	/**
	 * @return the spirit
	 */
	public int getSpirit() {
		return spirit;
	}

	/**
	 * @param spirit the spirit to set
	 */
	public void setSpirit(int spirit) {
		this.spirit = spirit;
	}
	
	public double getAttackPower(){
		return 2*this.strength + 1*this.agility;
	}
	
	public double getArmor(){
		return 0.6*this.strength + 2*this.agility;
	}
	
	public double getSpeed(){
		return 1.1*this.agility;
	}
	
	public double getResilience(){
		return 0.8*this.agility+0.1*this.strength;
	}
	
	public double getDodgeRating(){
		return 0.9*this.agility + 0.2*this.intellect;
	}
	
	public double getMana(){
		return 7.5*this.intellect;
	}
	
	public double getHealth(){
		return 10*this.stamina;
	}
	
	public double getSpellPenetration(){
		return 1.1*this.intellect;
	}
	
	public double getHaste(){
		return 0.8*this.intellect;
	}
	
	public double getHealthRegeneration(){
		return 3*this.spirit;
	}
	
	public double getManaRegeneration(){
		return 2.5*this.spirit + 0.5*this.intellect;
	}

}
